<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>添加文本框</title>
</head>

<body>
    <button onclick="addInput()">添加文本框</button>
    <div id="inputContainer"></div>
    <script>
        function addInput() {
            var input = document.createElement('input');
            input.type = 'text';
            var container = document.getElementById('inputContainer');
            container.appendChild(input);
        }
    </script>
</body>

</html>